import MySQLdb

from django.test import TestCase

# Create your tests here.
# conn = MySQLdb.Connect(
#     host='127.0.0.1',
#     port=3306,
#     user='root',
#     passwd='123456',
#     db='sh_library',
#     charset='utf8'
# )
# cursor = conn.cursor()
#
# person_uri = "http://data.library.sh.cn/entity/person/00ghm32s2ldhi1eg"
# sql = "select * from person where uri = '%s'" % person_uri
# cursor.execute(sql)
# # rs = cursor.fetchall()
# date = "1997-07-16"
# year = date.split("-")[0]
# print year
import json
with open('china.json') as json_file:
    data = json.load(json_file)
print type(data)
print data.keys()
print data['features']
